<?php

	include_once 'connection.php';

	class ApplicationsModel {
		
	  private $connection = null;
	   
	 	public function __construct(){
	 		$this->connection = Connection::getInstance();
	 	}
	    
		public function updateApplication($query){
			return $this->connection->insertRow($query);		
		}
		
		public function createApplication($query){
			return $this->connection->insertRow($query);
		}
		
		public function searchUserApplications($query){
			return $this->connection->complexSelect($query);
		}
		
		public function searchActiveApplication($query){
			return $this->connection->searchSelect($query);				
		}
		
		public function searchApplicationName($query){
			return $this->connection->searchSelect($query);
		}
		
		public function searchApplicationsSectionsAndElements($query){
			return $this->connection->complexSelect($query);
		}
		
		public function searchContentTextElement($query){
			return $this->connection->searchSelect($query);
		}
		
		public function searchElementsOfMenuList($query){
			return $this->connection->complexSelect($query);
		}
		
		public function searchImagesOfGallery($query){
			return $this->connection->complexSelect($query);
		}
	}

?>